package test1;

import java.util.*;
import java.io.IOException;
import javax.servlet.http.*;

@SuppressWarnings("serial")
public class Test1Servlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		resp.setContentType("text/html");
		String val = req.getParameter("p1");
		resp.getWriter().printf("Hello, %s\n",val);
		
		Map <String, String[]> parametres = req.getParameterMap();
		
		for(String paramName : parametres.keySet()) {
			resp.getWriter().printf("<ul><li>La parametre %s a pour valeur :</li>",paramName);
			for(String value : parametres.get(paramName)) {
				resp.getWriter().printf("<ul><li>\t %s </li></ul>",value);
			}
			resp.getWriter().printf("</ul>");
		}
	}
}
